/**
 * 
 */
package com.xbang.attendance.web.action.system.facilitator;

import org.springframework.beans.factory.annotation.Autowired;

import com.xbang.attendance.entity.system.FareFacilitator;
import com.xbang.attendance.service.SystemService;
import com.demo2do.lighturl.annotation.Action;
import com.xbang.core.struts.support.BaseActionSupport;

/**
 * @author dev.zhang
 * 
 */
public class View extends BaseActionSupport {

	private static final long serialVersionUID = -9163300318514580803L;

	private Integer id;

	private FareFacilitator fareFacilitator;

	@Autowired
	private SystemService systemService;

	/**
	 * 
	 * @return
	 * @throws Exception
	 */
	@Action("/system/facilitator/${id}/view")
	public String view() throws Exception {

		if (null == fareFacilitator && id != null) {
			fareFacilitator = (FareFacilitator) systemService.getObject(FareFacilitator.class, id);
		}
		return "detail";
	}

	/**
	 * @return the id
	 */
	public Integer getId() {
		return id;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setId(Integer id) {
		this.id = id;
	}

	/**
	 * @return the fareFacilitator
	 */
	public FareFacilitator getFareFacilitator() {
		return fareFacilitator;
	}

	/**
	 * @param fareFacilitator
	 *            the fareFacilitator to set
	 */
	public void setFareFacilitator(FareFacilitator fareFacilitator) {
		this.fareFacilitator = fareFacilitator;
	}

	/**
	 * @param systemService
	 *            the systemService to set
	 */
	public void setSystemService(SystemService systemService) {
		this.systemService = systemService;
	}

}
